'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async login() {
    const { ctx, ctx: { service, customBody }, app: { mysql } } = this;
    // 获取参数然后保存
    // var { openid = 'opHTu0BFAOqiHVyDhcIX3mEesfgk' } = customBody
    // var istrue = await service.user.find(openid)
    // ctx.body = istrue;
    // var userInfo = await mysql.get('wx_user', { openid })
    // ctx.body = userInfo;
  }
  async userInfo() {
    const { ctx } = this;

    ctx.body = ctx.customBody;
  }

}

module.exports = UserController;
